<?php

namespace App\Services;

use App\Models\CarryApplyLogModel;
use App\Utils\PriceUtis;

class CarryApplyService
{
    /**
     * 提现申请
     * @param int $userId 用户id
     * @param float $money 提现金额，单位元
     */
    public function apply(int $userId, float $money)
    {
        $newApply = new CarryApplyLogModel();
        $newApply->user_id = $userId;
        $newApply->money = PriceUtis::toFen($money);
        $newApply->order_sn = '111';
        $res = $newApply->save();
        if ($res) {
            return true;
        }
        return false;
    }

}
